package itcz.example.pattern.structure_type.decorator;

/**
 * @ClassName: Garnish
 * @Author: ITCZ
 * @Date: 2025-04-23
 * @Description: 抽象装饰（Decorator）角色: 继承或实现抽象构件，并包含具体构件的实例，可以通过其子类扩展具体构件的功能。
 */
public abstract class Garnish extends FastFood {
    // 声明快递类的变量
    private FastFood fastFood;

    public Garnish(FastFood fastFood, float price, String desc) {
        super(price, desc);
        this.fastFood = fastFood;
    }

    public FastFood getFastFood() {
        return fastFood;
    }

    public void setFastFood(FastFood fastFood) {
        this.fastFood = fastFood;
    }
}
